const p = new Promise((resolve,reject) => {
    setTimeout(() => {
        resolve("ok");
    },1000)
});

//因为then方法的返回值是一个promise对象 所以还可以再调用then()
p.then(value => {
    console.log(value);
    return 'success';
}).then(value => {
    console.log(value);
}).then(value => {
    console.log(value);
})